import 'package:json_annotation/json_annotation.dart';

part 'device_location.g.dart';

@JsonSerializable()
class DeviceLocationModel {
  String name;

  @JsonKey(defaultValue: false, includeFromJson: false, includeToJson: false, required: false)
  bool checked;

  DeviceLocationModel({required this.name, this.checked = false});

  factory DeviceLocationModel.fromJson(Map<String, dynamic> json) =>
      _$DeviceLocationModelFromJson(json);

  Map<String, dynamic> toJson() => _$DeviceLocationModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}
